package cn.zhj.springboot.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@NoArgsConstructor
@AllArgsConstructor
public enum CodeEnum {

    OK(200, "成功"),
    FAIL(400, "失败"),
    BAD_REQUEST(400, "请求错误"),
    NOT_FOUND(404, "未找到资源"),
    INTERNAL_ERROR(500, "内部服务器错误"),
    MODIFICATION_FAILED(400, "修改失败"),
    DELETION_FAILED(400, "删除失败"),
    CREATION_FAILED(400, "创建失败"),
    NOT_FOUND_USER(404, "未找到用户信息"),
    USER_PWD_FAIL(400, "密码错误"),
    USER_USERNAME_FAIL(400, "用户名错误"),
    INSUFFICIENT_BALANCE(400, "余额不足");


    @Getter
    @Setter
    private int code;
    @Getter
    @Setter
    private String msg;

}